home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows 6-Pak - Disc 3
/
Windows 6-Pak (InfoMagic) (Disc 3) (1999).ISO
/
Web-Server-Components
/
aexec15i.zip
/
activeexec.js
< prev
next >
Wrap
Text File
|
1998-11-01
|
948b
|
32 lines
// ActiveExec.js 1.5
// (c) 1998, Activity Software
//
// This is an example of using ActiveExec within Windows Scripting
// Host. It also serves to show how to implement ActiveExec.DLL in
// JScript.
//
// This example assumes installation of ActiveExec and assumes WindowsNT is
// installed in the C:\WINNT directory. If this is not true, change the
// CommandLine variable to the correct path.
//
// Requires: ActiveExec.DLL, Windows Scripting Host
//
// To execute: CSCRIPT.EXE ACTIVEExec.JS
// Create an instance of the ActiveExec object
proc=WScript.CreateObject("ActiveExec.Process");
CommandLine = "c:\\winnt\\system32\\ping.exe www.activitysoft.com";
// Execute the command stored in the CommandLine variable
proc.Execute(CommandLine);
// Display the returncode of the application
WScript.Echo(proc.ReturnCode);
// Display the text output by the call to PING.EXE
WScript.Echo(proc.OutputStream);